Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix: /api initial flag regression #201

Merged
merged 2 commits into from
Mar 25, 2024

Conversation

jimcheng256
Copy link
Contributor

Fixed regression introduced on the develop branch's TS migration blocking initial admin user setup on first run.

We had missed the initial property on the /api endpoint's response which was being checked in Angular to see if zero users exist on the server, at which point we should route the user to the create an admin user flow instead of prompting them to login (as it currently works on master). This change replaces it, though it's leveraging the legacy JS user model for the moment for simplicity's sake.

Talking to Robert, there's an upcoming plan to migrate this behavior to a secret-based approach so we don't race to create the first admin user after installing and launching the server for the first time. But this unblocks the situation for now on wholly new installs until that lands.

Feel free to advise on any stylistic changes to fit how things ought to work as I haven't had a lot of mileage on TS in general and our mage-server stack in particular yet. :)

… initial user setup

This temporarily fixes a regression on the develop branch from the TS migration that blocked first-run initial admin setup.
Robert is planning to replace how this will work with a secret-based approach rather than racing to create an admin user on the first run when zero users exist.
@jimcheng256 jimcheng256 requested review from restjohn and newmanw March 25, 2024 18:21
@newmanw newmanw self-assigned this Mar 25, 2024
Copy link
Member

@newmanw newmanw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix tests

@newmanw newmanw removed the request for review from restjohn March 25, 2024 18:45
@newmanw newmanw merged commit 0311246 into develop Mar 25, 2024
5 checks passed
@newmanw newmanw deleted the bugfix/fix-api-initial-flag-regression branch March 25, 2024 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants